/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package search;

/**
 *
 * @author dheath
 */
public class PriorityNode
{

    private WorldNode node;
    private double hcost;
    private double gCost;
    private PriorityNode parent;

    public PriorityNode(WorldNode node, double cost, PriorityNode parent, double accCost)
    {
        this.node = node;
        this.hcost = cost;
        this.parent = parent;
        this.gCost = accCost;
    }

    public double getTotalCost()
    {
        return getNode().getCost() + getgCost() + gethCost();
    }

    public double getCostSoFar()
    {
        return getNode().getCost() + getgCost();
    }

    public WorldNode getNode()
    {
        return node;
    }

    public void setNode(WorldNode node)
    {
        this.node = node;
    }

    public double gethCost()
    {
        return hcost;
    }

    public void sethCost(double cost)
    {
        this.hcost = cost;
    }

    public PriorityNode getParent()
    {
        return parent;
    }

    public void setParent(PriorityNode parent)
    {
        this.parent = parent;
    }

    public double getgCost()
    {
        return gCost;
    }

    public void setgCost(double accCost)
    {
        this.gCost = accCost;
    }
    }
